package com.four.mapper;

import com.four.entity.Role;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface RoleMapper {
    int deleteByPrimaryKey(Integer roleId);

    int insert(Role role);

    int insertSelective(Role record);

    Role selectByPrimaryKey(Integer roleId);

    int updateByPrimaryKeySelective(Role record);

    int updateByPrimaryKey(Role record);
    //查询所有角色
    List<Role> selectAll();
    //2.查询用户具有的角色id
    List<String> findRoleIdByUserId(Integer adminId);
    //1.根据用户删除该用户具有的角色id
    void deleteByUserId(Integer roleId);
    //2.添加新的角色id
    void insertRoleId(@Param("roleId") Integer roleId,@Param("pIds")Integer[] pIds);

    List<Role> selectByCondition();


}